package com.bjpowernode.common.enums;

/**
 * Package:com.bjpowernode.common.enums
 * Date:2022/3/3 15:30
 */
public enum RCode {

    UNKOWN(0,"系统出错请稍候重试"),
    SUCC(1000,"请求成功"),
    REQUEST_PARAM_ERR(1001,"请求参数有误"),
    REQUEST_PRODUCT_TYPE_ERR(1002,"产品类型有误"),
    PRODUCT_NOT_FOUND(1003,"产品不存在"),
    PHONE_IS_ILLEGAL(1004,"手机号格式不正确"),
    PHONE_IS_EXIST(1005,"手机号已经被注册了"),
    SEND_SMS_SUCCESS(1006,"短信发送成功"),
    SEND_SMS_FAIL(1007,"短信发送失败"),
    SMS_IS_EXIST(1008,"验证码已发送过，请检查短信或稍后再试"),
    CHECK_CODE_SUCCESS(1009,"验证码比对成功"),
    CHECK_CODE_FAIL(1010,"验证码比对失败"),
    CHECK_PASSWORD_FAIL(1011,"密码不符合要求"),
    LOGIN_PHONE_PASSWORD_FAIL(1012,"手机号或密码不符合要求"),
    REALNAME_IS_ILLEGAL(1013,"实名认证失败"),
    REALNAME_IS_SUCCESS(1014,"实名认证成功"),
    REALNAME_IS_EXITS(1015,"用户已经实名认证过了"),
    TOKEN_IS_ILLEGAL(3000,"Token无效"),


    ;
    RCode(int c, String t){
        this.code = c;
        this.text = t;
    }

    /**应答码
     * 0：默认
     * 1000-2000是请求参数有误，逻辑的问题
     * 2000-3000是服务器请求错误。
     * 3000-4000是访问dubbo的应答结果
     */
    private int code;
    private String text;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
